
class Config(object):
    # 项目的配置文件
    # 数据库连接的配置
    SQLALCHEMY_DATABASE_URI = 'mysql://root:123456@127.0.0.1/flask_news'
    SECRET_KEY = 'this is a random key string'
    MONGODB_SETTINGS = {
        'db': 'flask_news',
        # "username":"webapp",
        # "password":"pwd123"
    }

    REDIS_SETTINGS = {
        'host' : 'localhost',
        'port' : 6379,
        'db' : 2,
        'max_connections' : 20,
        'decode_responses' : True
    }

    INDEX_NEWS_KEY = 'index_news_key'

    # # 配置---数据库链接的配置参数
    # app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://root:123456@127.0.0.1/flask_news'
    # # 使用表单flask_wtf 需要配置一个SECRET_KEY  配置就行 具体使用不知
    # app.config['SECRET_KEY'] = 'this is a random key string'
    #
    # # 配置----MongoDB
    # app.config['MONGODB_SETTINGS'] = {
    #     'db': 'flask_news',
    #     # "username":"webapp",
    #     # "password":"pwd123"
    # }